About Testing

Checking Your Design

VBVoiceprovides several utilities for checking for design errors. Every time a check is performed, a test log is generated and reports the results.

Check Control

Check Control is accessed from the control context menu. This utility checks the current control for setup, greeting, and connection errors. The Test Mode also executes the control check on every control before passing a call to it.

Check Page, Check Frame, and Check System

Check Page, Check Frame, and Check System check the performance of the pages, frames, and system respectively.

Check System performs some extra checks over the other Check commands, so you should perform a Check System before attempting to start your system in run mode. Check System checks only currently loaded forms (displayed normal or minimized).

During a check, a test log window shows a hierarchical display of the controls checked. If an error is found, the offending control has a red error sign and the log entries are expanded underneath the entry for the control in question.

Double-click the error message in the test log window to highlight the control in error, or press F1 to get more detailed help on the error.

Interactive Test Mode

VBVoice provides a powerful, interactive test mode that works on a Windows sound card. The test mode can operate in Visual Basic design and run modes. Use the Test Mode dialog box to initiate tests of your system.

Using the Test Mode Dialog

Test mode allows you to start a test of your system at any point in the call-flow diagram. Access the dialog by selecting Start Test from the VBVFrame context menu.

Start In... Button

Start a test by selecting the control at which you want the test to begin.

Alternative Method: Click in the desired control and then click the Start button.

Start and Stop Buttons

Starts or stops the test. You are not able to make any design changes until the test stops.

HungUp Button

Simulates the caller hanging up the phone to terminate the call. It is only available when you test using a sound card.

Pause and Resume Buttons

Pause play, get digits, and delay operations until you are ready to resume.

Cancel Button

Terminates test mode and returns the system to normal operation.

Dial Pad

Enter digits from the caller when testing using a sound card.

Alternative Method: Use the keyboard to enter digits when testing using a sound card.

Starting a Test

To start a test:
  1. Select (by clicking) the control at which you want the test to begin.

  2. Click Start to begin the test.

notes:

The test log window appears when the test starts. This window monitors events as they occur in the system. If an error occurs, it is logged in this window and the test stops. To get more information on a log entry, select the line and press F1. To select the control related to an error, double-click the error line.

Read more about the test log window and interpreting errors.

Testing Subsystems and Individual Controls

Testing on a Sound Card

Test mode is useful for testing a subsystem without worrying about how the call is normally routed to the subsystem. In complex, multi-level menus, this great feature allows you to start a test at any point in the system. However, you must give consideration to the interactions between controls in your system.

EXAMPLE

A Record control uses control property substitution from a previous GetDigits control to create a filename based on the entered digits. If test mode is started at the Record control, the GetDigits control has not collected any digits. VBVoice detects this condition and displays a dialog requesting that you fill in the value that the GetDigits control would have supplied.

VBVoice detects conditions during tests and presents dialogs as required -- allowing you to interact with the system and simulate all possible operating scenarios.

VBVoice provides visual aids to demonstrate how your call is progressing through the call-flow diagram during the test. The call always starts in the control with the highlighted name. If the call moves to another control, the connection is highlighted. If an error occurs, or the call is terminated with the Stop button, the control name of the last control is highlighted in dark red, allowing you to locate errors quickly.

Testing on Voice Cards

Test mode is very useful during code development, integration with prompts, and initial testing of call-flows, but it does have limitations. Some applications (a typical example being a conferencing and pre-paid application that bridge callers to agents or resources) may not be fully tested on just one line. As well, running a test on a sound card is not the same as running on a real voice card. The telephony hardware is complex and its operation may vary between particular cards and protocols.

Therefore, the final application testing must always be done on the target telephony cards.

When testing a specific subsystem on a voice card, a common technique places a TakeCall control in the Ring event of the LineGroup in order to jump directly to the section of the call-flow being tested. Use this technique to skip over hierarchy of menus that are not relevant to the particular test case, which in effect produces a behaviour similar to the Test Mode.

Read about the voice card simulator.

Issues in Test Mode

Outdialling and Call Progress

VBVoice does not actually dial out in test mode but instead vocalizes the phone number digits. It also does not perform transfers or call progress detection. However, you can select the call progress condition that you want to test from a dialog, and so you can test all control paths without having to recreate (and wait for) ring-no-answer, busy, and so on.

Testing in Design Mode

You can invoke test mode when Visual Basic (VB) is in design mode. Use this method to quickly test part of your design.

However design mode testing has these limitations:

  1. Database access
  2. Database access is not available in design mode when using recordsets based on code. If the call arrives at a DataFind control which uses VB data recordsets, and VB is in design mode, the test terminates. ODBC database access is available in design mode and run mode.

  3. Visual Basic code
  4. If your design relies on Visual Basic code in custom VB phrase events, enter events or elsewhere, this code is not run in design mode. Because VBVoice cannot detect whether you have written code in these events, test mode runs but may not function correctly.

  5. Features requiring run mode
  6. VBVoice features that rely on being in run mode, such as User controls and the system phrase type VBPhrase, generate errors if they are encountered during design mode testing.

Testing in Run Mode

You can invoke test mode when VB is in run mode. In run mode database access is always available and Visual Basic event procedures are called. Ensure that VB loads the required forms at startup. This is required for normal operation and for test mode.

If you are only testing one form, you can designate it as the startup form in the VB/Project Properties/General. If you are testing more than one form, you must use the form load procedure in the startup form or module to load all other required forms. Load the form as an icon by setting the WindowState property to 1.

Visual Basic Debugging

Test mode does not interact with VB debug mode. If VB switches to break mode because of a code error or because of a breakpoint, the test mode terminates.